import logging
import yagmail
def log_set():
    logging.basicConfig(level=logging.DEBUG,format='%(asctime)s-%(pathname)s-%(levelname)s',filename='log.txt')

def send_mail(a):
        mail = yagmail.SMTP(user='2966471538@qq.com', password='wqkdvqyywfmxdfif', host='smtp.qq.com')
        mail.send(to='2966471538@qq.com', subject='测试报告', contents='今天测试内容', attachments=a)